:root {
    --primary-color: #2ecc71;
    --secondary-color: #e74c3c;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #3498db, #9b59b6);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--light-color);
}

.game-container {
    position: relative;
    width: 420px;
    height: 420px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background-color: var(--dark-color);
}

#game-canvas {
    width: 100%;
    height: 100%;
    display: none;
    background-color: #34495e;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(44, 62, 80, 0.9);
    z-index: 10;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
}

#start-screen {
    display: flex;
}

#game-over {
    display: none;
}

.game-title {
    font-size: 36px;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.difficulty-options {
    margin: 25px 0;
    display: flex;
    gap: 10px;
}

.difficulty-option {
    padding: 10px 20px;
    background-color: #34495e;
    color: var(--light-color);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    border: 2px solid transparent;
}

.difficulty-option:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.difficulty-option.selected {
    background-color: var(--primary-color);
    border-color: var(--light-color);
    transform: translateY(-3px);
}

.game-button {
    margin-top: 20px;
    padding: 12px 35px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.game-button:hover {
    background-color: #27ae60;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.game-button:active {
    transform: translateY(0);
}

#score-display {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    display: none;
    z-index: 5;
    color: white;
}

.instructions {
    margin-top: 30px;
    max-width: 400px;
    text-align: center;
    line-height: 1.6;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.snake-icon {
    font-size: 24px;
    margin-right: 10px;
}

.food-icon {
    color: var(--secondary-color);
}